<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title>基本信息</title> 
    <link href="css/base.css" rel="stylesheet">
    <link rel="stylesheet" href="jquery-easyui-1.5.3/themes/default/easyui.css">
    <link href="jquery-easyui-1.5.3/themes/icon.css" rel="stylesheet">
    <link href="css/basic_info.css" rel="stylesheet">
    <link rel="stylesheet" href="css/xk.css">
    <script type="text/javascript" src="font_jjkmvgsdpk/iconfont.js"></script>
    <link rel="stylesheet" href="font_jjkmvgsdpk/iconfont.css">
    <link href="css/process.css" rel="stylesheet">
</head> 
<body>
 <div class="container">
  <div class="xk_submit" style="height: 24px;background-color: #eeeeee;bottom: 0;left: 0;right: 0; position: fixed;text-align: center;"> 
    <button class="easyui-linkbutton" onclick="submit_fkxc_readonly()" type="button" iconCls="icon-save" style="height: 24px;margin-left: 5px;">提交</button>
  </div>
  <div class="content">
   <form>
    <div class="column"><span class="current">复勘信息</span></div>
    <table class="xk_table">
     <tr>
       <td class="xk_label" colspan="6">勘验号:K5000000000002019040009</td>
     </tr> 
     <tr>
      <td class="xk_label">勘验时间<font>*</font></td>
      <td class="td_input"><input type="text" placeholder="开始" class="xk_input" name=""></td>
      <td class="xk_label">勘验时间<font>*</font></td>
      <td class="td_input" colspan="3"><input style="width: 23.6%;" type="text" placeholder="结束" class="xk_input" name=""></td>
     </tr>
     <tr>
      <td class="xk_label">勘验地点<font>*</font></td>
      <td class="td_input" colspan="5"><input style="width: 98%;" type="text" id="faqh_val" key="" readonly="readonly" class="xk_input" name="">
     </tr>
                <tr>
                      <td class="xk_label">天气状况<font>*</font></td>
                      <td class="td_input">
                        <input type="checkbox" class="easyui-checkbox" name=""><span>阴</span>
                        <input type="checkbox" class="easyui-checkbox" name=""><span>晴</span>
                        <input type="checkbox" class="easyui-checkbox" name=""><span>风</span>
                        <input type="checkbox" class="easyui-checkbox" name=""><span>雪</span>
                        <input type="checkbox" class="easyui-checkbox" name=""><span>雾</span>
                        <input type="text" class="xk_input03" name="">
                      </td>
                      <td class="xk_label">温度<font>*</font></td>
                      <td class="td_input"><input type="text" class="xk_input" placeholder="℃" name=""></td>
                      <td class="xk_label">相对湿度<font>*</font></td>
                      <td class="td_input"><input type="text" class="xk_input" placeholder="%" name=""></td>
                    </tr>
                    <tr>
                      <td class="xk_label">风向<font>*</font></td>
                      <td class="td_input">
                             <select class="xk_select">
                              <option value="" check="check">请选择</option>
                              <option value="1">东风</option>
                              <option value="2">南风</option>
                              <option value="3">西风</option>
                              <option value="4">北风</option>
                              <option value="5">东南</option>
                              <option value="6">西南</option>
                              <option value="7">西北</option>
                              <option value="8">东北</option>
                              <option value="9">无风</option>
                              <option value="10">其他</option>
                            </select>
                       </td>
                       <td class="xk_label">光照条件<font>*</font></td>
                       <td class="td_input">
                            <input type="checkbox" class="easyui-checkbox" name=""><span>自然光</span>
                            <input type="checkbox" class="easyui-checkbox" name=""><span>灯光</span>
                            <input type="checkbox" class="easyui-checkbox" name=""><span>特种光</span>
                       </td>
                       <td colspan="2"></td>  
                    </tr>
                    <tr>
                      <td class="xk_label">现场条件<font>*</font></td>
                      <td class="td_input" colspan="5" id="xctj_td">
                            <input type="radio" name="xctj_radio" value="1"><span>原始现场</span>
                            <input type="radio" name="xctj_radio" value="2"><span>变动现场</span>
                            <span id="BDYYTD" style="display: none">
                            （<input type='checkbox' class='easyui-checkbox' name='xctj_checkbox'><span>主事进入</span>
                                <input type='checkbox' class='easyui-checkbox' name='xctj_checkbox'><span>报案人进入</span>
                                <input type='checkbox' class='easyui-checkbox' name='xctj_checkbox'><span>其他</span>
                                <input type='text' class='xk_input03' id='BDYYDESC'>
                             ）</span>
                      </td>
                    </tr>
                    <tr>
                        <td class="xk_label_textarea02">勘验检查情况<font>*</font></td>
                        <td colspan="5"><textarea type="text" class="xk_input_textarea02" name=""></textarea></td>
                    </tr>
                    <tr>
                       <td class="xk_label">录像<font>*</font></td> 
                       <td class="td_input"><input type="text" placeholder="分钟" class="xk_input" name=""></td>
                       <td class="xk_label">录音<font>*</font></td> 
                       <td class="td_input"><input type="text" placeholder="分钟" class="xk_input" name=""></td>
                       <td colspan="2"></td>
                    </tr>
                    <tr>
                        <td class="xk_label_textarea">现场遗留物<font>*</font></td>
                        <td colspan="5"><textarea type="text" class="xk_input_textarea" name=""></textarea></td>
                    </tr>
                    <tr>
                        <td class="xk_label">现场处置意见<font>*</font></td>
                        <td class="td_input" colspan="5">
                            <input type="radio" name="bl" class="easyui-radiobutton"><span>全部保留</span>
                            <input type="radio" name="bl" class="easyui-radiobutton"><span>局部保留</span>
                            <input type="radio" name="bl" class="easyui-radiobutton"><span>不保留</span>
                            <input type="text" class="xk_input02" name="">
                      </td>
                    </tr>
                    <tr>
                       <td class="xk_label">现场指挥人员<font>*</font></td> 
                       <td class="td_input"><input type="text" id="xczhry_val" readonly="readonly" key="" class="xk_input" name="">
                        <svg class="icon" aria-hidden="true" id="xczhry">
                            <use xlink:href="#icon-shujuzidian"></use>
                        </svg>
                       </td>
                       <td class="xk_label">勘验检查人员<font>*</font></td> 
                       <td class="td_input"><input type="text" class="xk_input" id="kyjcry_val" readonly="readonly" key="" name="">
                        <svg class="icon" aria-hidden="true" id="kyjcry">
                            <use xlink:href="#icon-shujuzidian"></use>
                        </svg>
                       </td>
                       <td class="xk_label">其他到达现场人员<font>*</font></td> 
                       <td class="td_input"><input type="text" class="xk_input" name=""></td>
                    </tr>
                    <tr>
                    <td class="xk_label_L">见证人<font>*</font></td> 
                    <td colspan="5">
                      <button class="easyui-linkbutton" type="button" id="jzr_add_btn" iconCls="icon-add" style="height: 24px;float: right;">新增</button>
                    </td> 
                  </tr>
                  <tr>
                    <td colspan="6">
                      <table class="xk_table02" id="jzr_table" style="margin-top: 0;">
                          <tr>
                            <th class="xk_label" style="width: 1.6%;">序号</th>
                            <th class="xk_label">姓名</th>
                            <th class="xk_label">性别</th>
                            <th class="xk_label">出生日期</th>
                            <th class="xk_label">单位住址</th>
                            <th class="xk_label" style="width: 1.6%;">操作</th>
                          </tr>
                          <tbody id="add_jzr_tr">
                            
                          </tbody>
                      </table>
                    </td>
                  </tr>          
    </table>
   </form> 
  </div>
 </div>
<!-- 现场指挥人员树 -->
<div id="div_xczhry_tree" class="easyui-dialog" closed="true">
 <ul id="xczhry_tree" style="width: 50%;float: left;margin-top: 1px;"></ul>
 <ul style="width: 50%;float: right;margin-top: 4px;" id="ul_xczhry_chanyong">
   <li key="0">常用项</li>
 </ul>
</div>
<!-- 勘验检查人员树 -->
<div id="div_kyjcry_tree" class="easyui-dialog" closed="true">
 <div style="width: 20%;float: left;">
    <input type="radio" name="sex" value="1" checked><span>本单位</span>
    <input type="radio" name="sex" value="2"><span>全部人员</span>
   <ul id="kyjcry_tree" style="margin-top: 1px;">
   </ul>
 </div>
 <div style="width: 80%;float: right;">
  <ul style="margin-top: 5px;" id="xckyry_ul">
    <li key="0">常用项：</li>
  </ul>
   <table class="xk_table" id="kyjcry_table" style="margin-top: 7px;">
    <tr>
     <th class="xk_label">姓名</th>
     <th class="xk_label" style='width: 18%;'>勘验职责</th>
     <th class="xk_label" style="text-align: center;">操作</th>
    </tr>
    <tbody id="add_kyjcry_tr">

    </tbody>
   </table>
 </div>
</div>  
</body>
<script type="text/javascript" src="jquery-easyui-1.5.3/jquery.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.5.3/jquery.easyui.min.js"></script>
<script type="text/javascript">
$("input[name='xctj_radio']").change(function(){
   var val=$(this).attr("value");
  if(val=="2"){
      $("#BDYYTD").attr("style","");
    }else if(val=="1"){
      $("#BDYYTD").attr("style","display: none");
      $("input[name='xctj_checkbox']").removeAttr("checked");
      $("#BDYYDESC").val("");
    }
})
var xczhry_val;
$("#xczhry").click(function(){
 $("#div_xczhry_tree").dialog({
  title:"现场指挥人员单选字典",
  width:"700px",
  height:"400px",
  closed: false,
  buttons:[
  {
  text:"选择空值",
  iconCls:"icon-redo",
  handler:function(){
   $("#xczhry_val").val("");
   $("#div_xczhry_tree").dialog("close");
  }
  },{
  text:"设为常用",
  iconCls:"icon-save",
  handler:function(){
    if(xczhry_node != null && xczhry_node.length != 0){
      var li_num = $("#ul_xczhry_chanyong li").length
      var lis = "";
      for(var i = 0;i<li_num;i++){
        lis += $("#ul_xczhry_chanyong li:eq("+i+")").attr("key");
      }
      var xczhry_Id = xczhry_id.toString();
       if(lis.indexOf(xczhry_Id) < 0){
       $("#ul_xczhry_chanyong").append("<li key='"+xczhry_id+"' ondblclick='xczhry_changyong_val(this)'><button class='easyui-linkbutton' onclick='xczhry_changyong_del(this)' type='button' iconCls='icon-cancel'></button>"+
        "<a href='javascript:;'>"+xczhry_node+"</a></li>");
        $.parser.parse("#ul_xczhry_chanyong");
     }
    }
  }
  }
  ],
 });
  $('#div_xczhry_tree').dialog('open'); //打开添加对话框
$('#div_xczhry_tree').window('center');//使Dialog居中显示
});
//现场指挥人员树
var xczhry_node;
var xczhry_id;
$("#xczhry_tree").tree({
  url:'json/xczhry_tree.json',
    method:"get",
  onLoadSuccess:function(){  
   $("#xczhry_tree").tree("collapseAll");  
  },
  onDblClick: function(node){
  if($('#xczhry_tree').tree('isLeaf',node.target)){
     $("#xczhry_val").val(node.text);
     $("#xczhry_val").attr("key",node.id);
     $("#div_xczhry_tree").dialog("close");
  }
 },
 onClick: function(node){
   if($('#xczhry_tree').tree('isLeaf',node.target)){
      xczhry_node = node.text;
      xczhry_id = node.id;
  }
 }
});
//删除现场指挥人员常用项
function xczhry_changyong_del(obj){
 $.messager.confirm("操作提示","确定要删除该常用项吗？",function (data){
  if(data){
   obj.parentNode.remove();
  }
 });
}
//给现场指挥人员框赋选定常用值
function xczhry_changyong_val(obj){
 $("#xczhry_val").val(obj.innerText);
 $("#xczhry_val").attr("key",obj.attributes.key.value);
 $("#div_xczhry_tree").dialog("close");
}
var kyjcry_val;
$("#kyjcry").click(function(){
 $("#div_kyjcry_tree").dialog({
  title:"勘验检查人员单选字典",
  width:"700px",
  height:"450px",
  closed: false,
  buttons:[
  {
  text:"提交",
  iconCls:"icon-redo",
  handler:function(){
   var lis = "";
   var ids = "";
   var tr_num = $("#add_kyjcry_tr").find("tr").length; 
   for(var i = 0;i<tr_num;i++){
    ids += $("#add_kyjcry_tr tr:eq("+i+") th:eq(0)").attr("key")+",";
    lis += $("#add_kyjcry_tr tr:eq("+i+") th:eq(0)").text()+",";
   }
   var strlis = lis.substring(0,lis.length-1);
   var strids = ids.substring(0,ids.length-1);
   $("#kyjcry_val").val(strlis);
   $("#kyjcry_val").attr("key",strids);
   $("#div_kyjcry_tree").dialog("close");
  }
  },{
    text:"取消",
    iconCls:"icon-cancel",
    handler:function(){
      $("#div_kyjcry_tree").dialog("close");
    }
  }
  ],
 });
  $('#div_kyjcry_tree').dialog('open'); //打开添加对话框
$('#div_kyjcry_tree').window('center');//使Dialog居中显示
});

//勘验检查人员数据为空时显示内容
var num = $("#add_kyjcry_tr").find("tr").length;
if(num <= 0){
  $("#add_kyjcry_tr").html("<tr><th class='xk_label02' key='-1' style='text-align:center;color:red;' colspan='3'>没有相对应的数据！</th></tr>")
}
//勘验检查人员树
var kyjcry_node;
var kyjcry_id;
$("#kyjcry_tree").tree({
  url:'json/xczhry_tree.json',
    method:"get",
  onLoadSuccess:function(){  
   $("#kyjcry_tree").tree("collapseAll");  
  },
  onDblClick: function(node){
  if($('#kyjcry_tree').tree('isLeaf',node.target)){
     kyjcry_node = node.text; 
     kyjcry_id = node.id;
     var lis="";
     var kyjcry_Id = kyjcry_id.toString(); 
     var tr_num = $("#add_kyjcry_tr").find("tr").length;
      for(var i = 0;i<tr_num;i++){
        lis += $("#add_kyjcry_tr tr:eq("+i+") th:eq(0)").attr("key");
      }
      if(lis.indexOf(kyjcry_Id) < 0){
        var key_val =  $("#add_kyjcry_tr tr th:eq(0)").attr("key");
        if(key_val == -1){
          $("#add_kyjcry_tr").html("");
        }
          $("#add_kyjcry_tr").append("<tr>"+ 
          "<th class='xk_label02' key='"+kyjcry_id+"'>"+kyjcry_node+"</th>"+
          "<th class='xk_label02' style='width: 18%;'>"+"<input type='radio' name='kyzz'>"+"<span>主勘</span>"+"<input type='radio' name='kyzz'>"+"<span>辅勘</span>"+"</th>"+
          "<th class='xk_label02' style='text-align: center;'>"+"<button onClick='kyjcry_tr_del(this)' class='easyui-linkbutton' type='button' iconCls='icon-cancel'>取消</button>"+
            "<button onClick='kyjcry_changyong(this)' class='easyui-linkbutton' type='button' iconCls='icon-large-smartart'>常用</button>"+
          "</th>"+
         "</tr>");
    $.parser.parse("#kyjcry_table");
        }
  }
 },
 onClick: function(node){
   if($('#kyjcry_tree').tree('isLeaf',node.target)){
      kyjcry_node = node.text; 
      kyjcry_id = node.id;
  }
 }
});
//设置勘验检查人员常用项
function kyjcry_changyong(obj){
 var chang_val = obj.parentNode.previousSibling.previousSibling.innerText;
 var chang_id = obj.parentNode.previousSibling.previousSibling.attributes.key.value;
 var chang_Id = chang_id.toString();
 var lis = "";
 var li_num = $("#xckyry_ul li").length;
  for(var i = 0;i<li_num;i++){
    lis += $("#xckyry_ul li:eq("+i+")").attr("key");
  }
  if(lis.indexOf(chang_Id) < 0){
     $("#xckyry_ul").append("<li ondblclick='kyjcry_tr_val(this)' style='float:left;margin-right: 7px;' key='"+chang_id+"'>"+
      "<button style='margin-right: 4px;height:15px;' iconCls='icon-cancel' onClick='kyjcry_changyong_del(this)' class='easyui-linkbutton'></button>"+
       "<a href='javascript:;'>"+chang_val+"</a></li>");
       $("#xckyry_ul li").prev().css({'float':'left','margin-right':'7px'});
       $("#xckyry_ul li:last-child").removeAttr('style','');
    $.parser.parse("#xckyry_ul");    
  }
}

//删除勘验检查人员列表项
function kyjcry_tr_del(obj){
 $.messager.confirm("操作提示","确定要删除该行吗？",function (data){
  if(data){
   obj.parentNode.parentNode.remove();
  }
 });
}
//删除勘验检查人员常用项
function kyjcry_changyong_del(obj){
 $.messager.confirm("操作提示","确定要删除该常用项吗？",function (data){
  if(data){
   obj.parentNode.remove();
  }
 });
}
//给勘验检查人员列表赋值
function kyjcry_tr_val(obj){
 var lis = "";
 var tr_num = $("#add_kyjcry_tr").find("tr").length;
 var li_key = obj.attributes.key.value;
 var li_val = obj.innerText;
 var Li_key = li_key.toString(); 
 for(var i = 0;i<tr_num;i++){
  lis += $("#add_kyjcry_tr tr:eq("+i+") th:eq(0)").attr("key");
 }
 if(lis.indexOf(Li_key) < 0){
  var key_val =  $("#add_kyjcry_tr tr th:eq(0)").attr("key");
  if(key_val == -1){
    $("#add_kyjcry_tr").html("");
  }
  $("#add_kyjcry_tr").append("<tr>"+ 
   "<th class='xk_label02' key='"+li_key+"'>"+li_val+"</th>"+
   "<th class='xk_label02' style='width: 18%;'>"+"<input type='radio' name='kyzz'>"+"<span>主勘</span>"+"<input type='radio' name='kyzz'>"+"<span>辅勘</span"+"</th>"+
   "<th class='xk_label02' style='text-align: center;'>"+"<button onClick='kyjcry_tr_del(this)' class='easyui-linkbutton' type='button' iconCls='icon-cancel'>取消</button>"+
   "<button onClick='kyjcry_changyong(this)' class='easyui-linkbutton' type='button' iconCls='icon-large-smartart'>常用</button>"+
   "</th>"+
   "</tr>");
   $.parser.parse("#kyjcry_table");
 }
}
var jzr = 0;
$("#jzr_add_btn").click(function(){
  var jzr_tr_num = ++jzr;
  $("#add_jzr_tr").append("<tr id='"+jzr_tr_num+"'>"+
                            "<th class='' style='width: 1.6%;'><input type='text' class='xk_input04' value='"+jzr_tr_num+"'></th>"+
                            "<th class=''><input type='text' class='xk_input04' name=''></th>"+
                            "<th class=''>"+
                              "<select class='xk_input04'>"+
                                "<option value=''>请选择</option>"+
                                "<option value='1'>未知</option>"+
                                "<option value='2'>男</option>"+
                                "<option value='3'>女</option>"+
                              "</select>"+
                            "</th>"+
                            "<th class=''><input type='text' class='xk_input04' name=''></th>"+
                            "<th class=''><input type='text' class='xk_input04' name=''></th>"+
                            "<th class='' style='width: 1.6%;text-align:center;'>"+
                              "<button type='button' class='easyui-linkbutton' onclick='jzr_tr_del(this)' iconCls='icon-cancel'>删除</button>"+
                            "</th>"+
                          "</tr>");
        $.parser.parse("#jzr_table");
});
//删除一行见证人
function jzr_tr_del(obj){
  //控制序号
  var count = $("#jzr_table").find("tr").length-1;
  //得到当前所在行
  var rows = obj.parentNode.parentNode.rowIndex;
  obj.parentNode.parentNode.remove();
  jzr--;
  if(rows <= count){
    for(var i = rows;i<=count;i++){
      var j = i-1;
      var val =$("#jzr_table tr:gt("+j+") th:eq(0)").find("input").first().val();
      var cou = val - 1;
      $("#jzr_table tr:gt("+j+") th:eq(0)").find("input").first().val(cou);
    }
  }
}
function submit_fkxc_readonly() {
    window.location.href="fkxc_readonly";
}
</script>
</html>